package demo.standard;

import java.util.ArrayList;
import java.util.List;

public class ObjectStructure {

    private static List<IElement> elements = new ArrayList<>();

    static {
        elements.add(new ConcreteElementA());
        elements.add(new ConcreteElementB());
    }

    public void useForClient(IVisitor visitor) {
        for (IElement element : elements) {
            element.accept(visitor);
        }
    }
}
